{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false
   },
   "source": [
    "### Install\n",
    "If you use `pip`, you can install jupyterlab with:\n",
    "\n",
    "```\n",
    "pip install jupyterlab\n",
    "```\n",
    "If installing using `pip install --user`, you must add the user-level `bin` directory to your PATH environment variable in order to launch `jupyter lab`\n",
    "\n",
    "```\n",
    "python3 -m pip install --upgrade pip\n",
    "python3 -m pip install jupyter\n",
    "jupyter notebook\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "IPython -- An enhanced Interactive Python - Quick Reference Card\n",
       "================================================================\n",
       "\n",
       "obj?, obj??      : Get help, or more help for object (also works as\n",
       "                   ?obj, ??obj).\n",
       "?foo.*abc*       : List names in 'foo' containing 'abc' in them.\n",
       "%magic           : Information about IPython's 'magic' % functions.\n",
       "\n",
       "Magic functions are prefixed by % or %%, and typically take their arguments\n",
       "without parentheses, quotes or even commas for convenience.  Line magics take a\n",
       "single % and cell magics are prefixed with two %%.\n",
       "\n",
       "Example magic function calls:\n",
       "\n",
       "%alias d ls -F   : 'd' is now an alias for 'ls -F'\n",
       "alias d ls -F    : Works if 'alias' not a python name\n",
       "alist = %alias   : Get list of aliases to 'alist'\n",
       "cd /usr/share    : Obvious. cd -<tab> to choose from visited dirs.\n",
       "%cd??            : See help AND source for magic %cd\n",
       "%timeit x=10     : time the 'x=10' statement with high precision.\n",
       "%%timeit x=2**100\n",
       "x**100           : time 'x**100' with a setup of 'x=2**100'; setup code is not\n",
       "                   counted.  This is an example of a cell magic.\n",
       "\n",
       "System commands:\n",
       "\n",
       "!cp a.txt b/     : System command escape, calls os.system()\n",
       "cp a.txt b/      : after %rehashx, most system commands work without !\n",
       "cp ${f}.txt $bar : Variable expansion in magics and system commands\n",
       "files = !ls /usr : Capture system command output\n",
       "files.s, files.l, files.n: \"a b c\", ['a','b','c'], 'a\\nb\\nc'\n",
       "\n",
       "History:\n",
       "\n",
       "_i, _ii, _iii    : Previous, next previous, next next previous input\n",
       "_i4, _ih[2:5]    : Input history line 4, lines 2-4\n",
       "exec _i81        : Execute input history line #81 again\n",
       "%rep 81          : Edit input history line #81\n",
       "_, __, ___       : previous, next previous, next next previous output\n",
       "_dh              : Directory history\n",
       "_oh              : Output history\n",
       "%hist            : Command history of current session.\n",
       "%hist -g foo     : Search command history of (almost) all sessions for 'foo'.\n",
       "%hist -g         : Command history of (almost) all sessions.\n",
       "%hist 1/2-8      : Command history containing lines 2-8 of session 1.\n",
       "%hist 1/ ~2/     : Command history of session 1 and 2 sessions before current.\n",
       "%hist ~8/1-~6/5  : Command history from line 1 of 8 sessions ago to\n",
       "                   line 5 of 6 sessions ago.\n",
       "%edit 0/         : Open editor to execute code with history of current session.\n",
       "\n",
       "Autocall:\n",
       "\n",
       "f 1,2            : f(1,2)  # Off by default, enable with %autocall magic.\n",
       "/f 1,2           : f(1,2) (forced autoparen)\n",
       ",f 1 2           : f(\"1\",\"2\")\n",
       ";f 1 2           : f(\"1 2\")\n",
       "\n",
       "Remember: TAB completion works in many contexts, not just file names\n",
       "or python names.\n",
       "\n",
       "The following magic functions are currently available:\n",
       "\n",
       "%alias:\n",
       "    Define an alias for a system command.\n",
       "%alias_magic:\n",
       "    ::\n",
       "%autoawait:\n",
       "    \n",
       "%autocall:\n",
       "    Make functions callable without having to type parentheses.\n",
       "%automagic:\n",
       "    Make magic functions callable without having to type the initial %.\n",
       "%autosave:\n",
       "    Set the autosave interval in the notebook (in seconds).\n",
       "%bookmark:\n",
       "    Manage IPython's bookmark system.\n",
       "%cd:\n",
       "    Change the current working directory.\n",
       "%clear:\n",
       "    Clear the terminal.\n",
       "%cls:\n",
       "    Clear the terminal.\n",
       "%colors:\n",
       "    Switch color scheme for prompts, info system and exception handlers.\n",
       "%conda:\n",
       "    Run the conda package manager within the current kernel.\n",
       "%config:\n",
       "    configure IPython\n",
       "%connect_info:\n",
       "    Print information for connecting other clients to this kernel\n",
       "%copy:\n",
       "    Alias for `!copy`\n",
       "%ddir:\n",
       "    Alias for `!dir /ad /on`\n",
       "%debug:\n",
       "    ::\n",
       "%dhist:\n",
       "    Print your history of visited directories.\n",
       "%dirs:\n",
       "    Return the current directory stack.\n",
       "%doctest_mode:\n",
       "    Toggle doctest mode on and off.\n",
       "%echo:\n",
       "    Alias for `!echo`\n",
       "%ed:\n",
       "    Alias for `%edit`.\n",
       "%edit:\n",
       "    Bring up an editor and execute the resulting code.\n",
       "%env:\n",
       "    Get, set, or list environment variables.\n",
       "%gui:\n",
       "    Enable or disable IPython GUI event loop integration.\n",
       "%hist:\n",
       "    Alias for `%history`.\n",
       "%history:\n",
       "    ::\n",
       "%killbgscripts:\n",
       "    Kill all BG processes started by %%script and its family.\n",
       "%ldir:\n",
       "    Alias for `!dir /ad /on`\n",
       "%less:\n",
       "    Show a file through the pager.\n",
       "%load:\n",
       "    Load code into the current frontend.\n",
       "%load_ext:\n",
       "    Load an IPython extension by its module name.\n",
       "%loadpy:\n",
       "    Alias of `%load`\n",
       "%logoff:\n",
       "    Temporarily stop logging.\n",
       "%logon:\n",
       "    Restart logging.\n",
       "%logstart:\n",
       "    Start logging anywhere in a session.\n",
       "%logstate:\n",
       "    Print the status of the logging system.\n",
       "%logstop:\n",
       "    Fully stop logging and close log file.\n",
       "%ls:\n",
       "    Alias for `!dir /on`\n",
       "%lsmagic:\n",
       "    List currently available magic functions.\n",
       "%macro:\n",
       "    Define a macro for future re-execution. It accepts ranges of history,\n",
       "%magic:\n",
       "    Print information about the magic function system.\n",
       "%matplotlib:\n",
       "    ::\n",
       "%mkdir:\n",
       "    Alias for `!mkdir`\n",
       "%more:\n",
       "    Show a file through the pager.\n",
       "%notebook:\n",
       "    ::\n",
       "%page:\n",
       "    Pretty print the object and display it through a pager.\n",
       "%pastebin:\n",
       "    Upload code to dpaste's paste bin, returning the URL.\n",
       "%pdb:\n",
       "    Control the automatic calling of the pdb interactive debugger.\n",
       "%pdef:\n",
       "    Print the call signature for any callable object.\n",
       "%pdoc:\n",
       "    Print the docstring for an object.\n",
       "%pfile:\n",
       "    Print (or run through pager) the file where an object is defined.\n",
       "%pinfo:\n",
       "    Provide detailed information about an object.\n",
       "%pinfo2:\n",
       "    Provide extra detailed information about an object.\n",
       "%pip:\n",
       "    Run the pip package manager within the current kernel.\n",
       "%popd:\n",
       "    Change to directory popped off the top of the stack.\n",
       "%pprint:\n",
       "    Toggle pretty printing on/off.\n",
       "%precision:\n",
       "    Set floating point precision for pretty printing.\n",
       "%prun:\n",
       "    Run a statement through the python code profiler.\n",
       "%psearch:\n",
       "    Search for object in namespaces by wildcard.\n",
       "%psource:\n",
       "    Print (or run through pager) the source code for an object.\n",
       "%pushd:\n",
       "    Place the current dir on stack and change directory.\n",
       "%pwd:\n",
       "    Return the current working directory path.\n",
       "%pycat:\n",
       "    Show a syntax-highlighted file through a pager.\n",
       "%pylab:\n",
       "    ::\n",
       "%qtconsole:\n",
       "    Open a qtconsole connected to this kernel.\n",
       "%quickref:\n",
       "    Show a quick reference sheet \n",
       "%recall:\n",
       "    Repeat a command, or get command to input line for editing.\n",
       "%rehashx:\n",
       "    Update the alias table with all executable files in $PATH.\n",
       "%reload_ext:\n",
       "    Reload an IPython extension by its module name.\n",
       "%ren:\n",
       "    Alias for `!ren`\n",
       "%rep:\n",
       "    Alias for `%recall`.\n",
       "%rerun:\n",
       "    Re-run previous input\n",
       "%reset:\n",
       "    Resets the namespace by removing all names defined by the user, if\n",
       "%reset_selective:\n",
       "    Resets the namespace by removing names defined by the user.\n",
       "%rmdir:\n",
       "    Alias for `!rmdir`\n",
       "%run:\n",
       "    Run the named file inside IPython as a program.\n",
       "%save:\n",
       "    Save a set of lines or a macro to a given filename.\n",
       "%sc:\n",
       "    Shell capture - run shell command and capture output (DEPRECATED use !).\n",
       "%set_env:\n",
       "    Set environment variables.  Assumptions are that either \"val\" is a\n",
       "%store:\n",
       "    Lightweight persistence for python variables.\n",
       "%sx:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%system:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%tb:\n",
       "    Print the last traceback.\n",
       "%time:\n",
       "    Time execution of a Python statement or expression.\n",
       "%timeit:\n",
       "    Time execution of a Python statement or expression\n",
       "%unalias:\n",
       "    Remove an alias\n",
       "%unload_ext:\n",
       "    Unload an IPython extension by its module name.\n",
       "%who:\n",
       "    Print all interactive variables, with some minimal formatting.\n",
       "%who_ls:\n",
       "    Return a sorted list of all interactive variables.\n",
       "%whos:\n",
       "    Like %who, but gives some extra information about each variable.\n",
       "%xdel:\n",
       "    Delete a variable, trying to clear it from anywhere that\n",
       "%xmode:\n",
       "    Switch modes for the exception handlers.\n",
       "%%!:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%%HTML:\n",
       "    Alias for `%%html`.\n",
       "%%SVG:\n",
       "    Alias for `%%svg`.\n",
       "%%bash:\n",
       "    %%bash script magic\n",
       "%%capture:\n",
       "    ::\n",
       "%%cmd:\n",
       "    %%cmd script magic\n",
       "%%debug:\n",
       "    ::\n",
       "%%file:\n",
       "    Alias for `%%writefile`.\n",
       "%%html:\n",
       "    ::\n",
       "%%javascript:\n",
       "    Run the cell block of Javascript code\n",
       "%%js:\n",
       "    Run the cell block of Javascript code\n",
       "%%latex:\n",
       "    Render the cell as a block of latex\n",
       "%%markdown:\n",
       "    Render the cell as Markdown text block\n",
       "%%perl:\n",
       "    %%perl script magic\n",
       "%%prun:\n",
       "    Run a statement through the python code profiler.\n",
       "%%pypy:\n",
       "    %%pypy script magic\n",
       "%%python:\n",
       "    %%python script magic\n",
       "%%python2:\n",
       "    %%python2 script magic\n",
       "%%python3:\n",
       "    %%python3 script magic\n",
       "%%ruby:\n",
       "    %%ruby script magic\n",
       "%%script:\n",
       "    ::\n",
       "%%sh:\n",
       "    %%sh script magic\n",
       "%%svg:\n",
       "    Render the cell as an SVG literal\n",
       "%%sx:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%%system:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%%time:\n",
       "    Time execution of a Python statement or expression.\n",
       "%%timeit:\n",
       "    Time execution of a Python statement or expression\n",
       "%%writefile:\n",
       "    ::\n"
      ]
     },
     "execution_count": 7,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%quickref"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "FloatingPointError\n",
       "breakpoint\n",
       "int\n",
       "print"
      ]
     },
     "execution_count": 1,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "*int*?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
   ],
   "source": [
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\u001b[1;31mSignature:\u001b[0m\n",
       "\u001b[0mcollections\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnamedtuple\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m\n",
       "\u001b[0m    \u001b[0mtypename\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
       "\u001b[0m    \u001b[0mfield_names\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
       "\u001b[0m    \u001b[1;33m*\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
       "\u001b[0m    \u001b[0mrename\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
       "\u001b[0m    \u001b[0mdefaults\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
       "\u001b[0m    \u001b[0mmodule\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
       "\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
       "\u001b[1;31mDocstring:\u001b[0m\n",
       "Returns a new subclass of tuple with named fields.\n",
       "\n",
       ">>> Point = namedtuple('Point', ['x', 'y'])\n",
       ">>> Point.__doc__                   # docstring for the new class\n",
       "'Point(x, y)'\n",
       ">>> p = Point(11, y=22)             # instantiate with positional args or keywords\n",
       ">>> p[0] + p[1]                     # indexable like a plain tuple\n",
       "33\n",
       ">>> x, y = p                        # unpack like a regular tuple\n",
       ">>> x, y\n",
       "(11, 22)\n",
       ">>> p.x + p.y                       # fields also accessible by name\n",
       "33\n",
       ">>> d = p._asdict()                 # convert to a dictionary\n",
       ">>> d['x']\n",
       "11\n",
       ">>> Point(**d)                      # convert from a dictionary\n",
       "Point(x=11, y=22)\n",
       ">>> p._replace(x=100)               # _replace() is like str.replace() but targets named fields\n",
       "Point(x=100, y=22)\n",
       "\u001b[1;31mFile:\u001b[0m      d:\\python37\\lib\\collections\\__init__.py\n",
       "\u001b[1;31mType:\u001b[0m      function\n"
      ]
     },
     "execution_count": 4,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import collections\n",
    "collections.namedtuple?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING: Some output was deleted.\n"
     ]
    }
   ],
   "source": [
    "collections.Counter??"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "IPython -- An enhanced Interactive Python - Quick Reference Card\n",
       "================================================================\n",
       "\n",
       "obj?, obj??      : Get help, or more help for object (also works as\n",
       "                   ?obj, ??obj).\n",
       "?foo.*abc*       : List names in 'foo' containing 'abc' in them.\n",
       "%magic           : Information about IPython's 'magic' % functions.\n",
       "\n",
       "Magic functions are prefixed by % or %%, and typically take their arguments\n",
       "without parentheses, quotes or even commas for convenience.  Line magics take a\n",
       "single % and cell magics are prefixed with two %%.\n",
       "\n",
       "Example magic function calls:\n",
       "\n",
       "%alias d ls -F   : 'd' is now an alias for 'ls -F'\n",
       "alias d ls -F    : Works if 'alias' not a python name\n",
       "alist = %alias   : Get list of aliases to 'alist'\n",
       "cd /usr/share    : Obvious. cd -<tab> to choose from visited dirs.\n",
       "%cd??            : See help AND source for magic %cd\n",
       "%timeit x=10     : time the 'x=10' statement with high precision.\n",
       "%%timeit x=2**100\n",
       "x**100           : time 'x**100' with a setup of 'x=2**100'; setup code is not\n",
       "                   counted.  This is an example of a cell magic.\n",
       "\n",
       "System commands:\n",
       "\n",
       "!cp a.txt b/     : System command escape, calls os.system()\n",
       "cp a.txt b/      : after %rehashx, most system commands work without !\n",
       "cp ${f}.txt $bar : Variable expansion in magics and system commands\n",
       "files = !ls /usr : Capture system command output\n",
       "files.s, files.l, files.n: \"a b c\", ['a','b','c'], 'a\\nb\\nc'\n",
       "\n",
       "History:\n",
       "\n",
       "_i, _ii, _iii    : Previous, next previous, next next previous input\n",
       "_i4, _ih[2:5]    : Input history line 4, lines 2-4\n",
       "exec _i81        : Execute input history line #81 again\n",
       "%rep 81          : Edit input history line #81\n",
       "_, __, ___       : previous, next previous, next next previous output\n",
       "_dh              : Directory history\n",
       "_oh              : Output history\n",
       "%hist            : Command history of current session.\n",
       "%hist -g foo     : Search command history of (almost) all sessions for 'foo'.\n",
       "%hist -g         : Command history of (almost) all sessions.\n",
       "%hist 1/2-8      : Command history containing lines 2-8 of session 1.\n",
       "%hist 1/ ~2/     : Command history of session 1 and 2 sessions before current.\n",
       "%hist ~8/1-~6/5  : Command history from line 1 of 8 sessions ago to\n",
       "                   line 5 of 6 sessions ago.\n",
       "%edit 0/         : Open editor to execute code with history of current session.\n",
       "\n",
       "Autocall:\n",
       "\n",
       "f 1,2            : f(1,2)  # Off by default, enable with %autocall magic.\n",
       "/f 1,2           : f(1,2) (forced autoparen)\n",
       ",f 1 2           : f(\"1\",\"2\")\n",
       ";f 1 2           : f(\"1 2\")\n",
       "\n",
       "Remember: TAB completion works in many contexts, not just file names\n",
       "or python names.\n",
       "\n",
       "The following magic functions are currently available:\n",
       "\n",
       "%alias:\n",
       "    Define an alias for a system command.\n",
       "%alias_magic:\n",
       "    ::\n",
       "%autoawait:\n",
       "    \n",
       "%autocall:\n",
       "    Make functions callable without having to type parentheses.\n",
       "%automagic:\n",
       "    Make magic functions callable without having to type the initial %.\n",
       "%autosave:\n",
       "    Set the autosave interval in the notebook (in seconds).\n",
       "%bookmark:\n",
       "    Manage IPython's bookmark system.\n",
       "%cd:\n",
       "    Change the current working directory.\n",
       "%clear:\n",
       "    Clear the terminal.\n",
       "%cls:\n",
       "    Clear the terminal.\n",
       "%colors:\n",
       "    Switch color scheme for prompts, info system and exception handlers.\n",
       "%conda:\n",
       "    Run the conda package manager within the current kernel.\n",
       "%config:\n",
       "    configure IPython\n",
       "%connect_info:\n",
       "    Print information for connecting other clients to this kernel\n",
       "%copy:\n",
       "    Alias for `!copy`\n",
       "%ddir:\n",
       "    Alias for `!dir /ad /on`\n",
       "%debug:\n",
       "    ::\n",
       "%dhist:\n",
       "    Print your history of visited directories.\n",
       "%dirs:\n",
       "    Return the current directory stack.\n",
       "%doctest_mode:\n",
       "    Toggle doctest mode on and off.\n",
       "%echo:\n",
       "    Alias for `!echo`\n",
       "%ed:\n",
       "    Alias for `%edit`.\n",
       "%edit:\n",
       "    Bring up an editor and execute the resulting code.\n",
       "%env:\n",
       "    Get, set, or list environment variables.\n",
       "%gui:\n",
       "    Enable or disable IPython GUI event loop integration.\n",
       "%hist:\n",
       "    Alias for `%history`.\n",
       "%history:\n",
       "    ::\n",
       "%killbgscripts:\n",
       "    Kill all BG processes started by %%script and its family.\n",
       "%ldir:\n",
       "    Alias for `!dir /ad /on`\n",
       "%less:\n",
       "    Show a file through the pager.\n",
       "%load:\n",
       "    Load code into the current frontend.\n",
       "%load_ext:\n",
       "    Load an IPython extension by its module name.\n",
       "%loadpy:\n",
       "    Alias of `%load`\n",
       "%logoff:\n",
       "    Temporarily stop logging.\n",
       "%logon:\n",
       "    Restart logging.\n",
       "%logstart:\n",
       "    Start logging anywhere in a session.\n",
       "%logstate:\n",
       "    Print the status of the logging system.\n",
       "%logstop:\n",
       "    Fully stop logging and close log file.\n",
       "%ls:\n",
       "    Alias for `!dir /on`\n",
       "%lsmagic:\n",
       "    List currently available magic functions.\n",
       "%macro:\n",
       "    Define a macro for future re-execution. It accepts ranges of history,\n",
       "%magic:\n",
       "    Print information about the magic function system.\n",
       "%matplotlib:\n",
       "    ::\n",
       "%mkdir:\n",
       "    Alias for `!mkdir`\n",
       "%more:\n",
       "    Show a file through the pager.\n",
       "%notebook:\n",
       "    ::\n",
       "%page:\n",
       "    Pretty print the object and display it through a pager.\n",
       "%pastebin:\n",
       "    Upload code to dpaste's paste bin, returning the URL.\n",
       "%pdb:\n",
       "    Control the automatic calling of the pdb interactive debugger.\n",
       "%pdef:\n",
       "    Print the call signature for any callable object.\n",
       "%pdoc:\n",
       "    Print the docstring for an object.\n",
       "%pfile:\n",
       "    Print (or run through pager) the file where an object is defined.\n",
       "%pinfo:\n",
       "    Provide detailed information about an object.\n",
       "%pinfo2:\n",
       "    Provide extra detailed information about an object.\n",
       "%pip:\n",
       "    Run the pip package manager within the current kernel.\n",
       "%popd:\n",
       "    Change to directory popped off the top of the stack.\n",
       "%pprint:\n",
       "    Toggle pretty printing on/off.\n",
       "%precision:\n",
       "    Set floating point precision for pretty printing.\n",
       "%prun:\n",
       "    Run a statement through the python code profiler.\n",
       "%psearch:\n",
       "    Search for object in namespaces by wildcard.\n",
       "%psource:\n",
       "    Print (or run through pager) the source code for an object.\n",
       "%pushd:\n",
       "    Place the current dir on stack and change directory.\n",
       "%pwd:\n",
       "    Return the current working directory path.\n",
       "%pycat:\n",
       "    Show a syntax-highlighted file through a pager.\n",
       "%pylab:\n",
       "    ::\n",
       "%qtconsole:\n",
       "    Open a qtconsole connected to this kernel.\n",
       "%quickref:\n",
       "    Show a quick reference sheet \n",
       "%recall:\n",
       "    Repeat a command, or get command to input line for editing.\n",
       "%rehashx:\n",
       "    Update the alias table with all executable files in $PATH.\n",
       "%reload_ext:\n",
       "    Reload an IPython extension by its module name.\n",
       "%ren:\n",
       "    Alias for `!ren`\n",
       "%rep:\n",
       "    Alias for `%recall`.\n",
       "%rerun:\n",
       "    Re-run previous input\n",
       "%reset:\n",
       "    Resets the namespace by removing all names defined by the user, if\n",
       "%reset_selective:\n",
       "    Resets the namespace by removing names defined by the user.\n",
       "%rmdir:\n",
       "    Alias for `!rmdir`\n",
       "%run:\n",
       "    Run the named file inside IPython as a program.\n",
       "%save:\n",
       "    Save a set of lines or a macro to a given filename.\n",
       "%sc:\n",
       "    Shell capture - run shell command and capture output (DEPRECATED use !).\n",
       "%set_env:\n",
       "    Set environment variables.  Assumptions are that either \"val\" is a\n",
       "%store:\n",
       "    Lightweight persistence for python variables.\n",
       "%sx:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%system:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%tb:\n",
       "    Print the last traceback.\n",
       "%time:\n",
       "    Time execution of a Python statement or expression.\n",
       "%timeit:\n",
       "    Time execution of a Python statement or expression\n",
       "%unalias:\n",
       "    Remove an alias\n",
       "%unload_ext:\n",
       "    Unload an IPython extension by its module name.\n",
       "%who:\n",
       "    Print all interactive variables, with some minimal formatting.\n",
       "%who_ls:\n",
       "    Return a sorted list of all interactive variables.\n",
       "%whos:\n",
       "    Like %who, but gives some extra information about each variable.\n",
       "%xdel:\n",
       "    Delete a variable, trying to clear it from anywhere that\n",
       "%xmode:\n",
       "    Switch modes for the exception handlers.\n",
       "%%!:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%%HTML:\n",
       "    Alias for `%%html`.\n",
       "%%SVG:\n",
       "    Alias for `%%svg`.\n",
       "%%bash:\n",
       "    %%bash script magic\n",
       "%%capture:\n",
       "    ::\n",
       "%%cmd:\n",
       "    %%cmd script magic\n",
       "%%debug:\n",
       "    ::\n",
       "%%file:\n",
       "    Alias for `%%writefile`.\n",
       "%%html:\n",
       "    ::\n",
       "%%javascript:\n",
       "    Run the cell block of Javascript code\n",
       "%%js:\n",
       "    Run the cell block of Javascript code\n",
       "%%latex:\n",
       "    Render the cell as a block of latex\n",
       "%%markdown:\n",
       "    Render the cell as Markdown text block\n",
       "%%perl:\n",
       "    %%perl script magic\n",
       "%%prun:\n",
       "    Run a statement through the python code profiler.\n",
       "%%pypy:\n",
       "    %%pypy script magic\n",
       "%%python:\n",
       "    %%python script magic\n",
       "%%python2:\n",
       "    %%python2 script magic\n",
       "%%python3:\n",
       "    %%python3 script magic\n",
       "%%ruby:\n",
       "    %%ruby script magic\n",
       "%%script:\n",
       "    ::\n",
       "%%sh:\n",
       "    %%sh script magic\n",
       "%%svg:\n",
       "    Render the cell as an SVG literal\n",
       "%%sx:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%%system:\n",
       "    Shell execute - run shell command and capture output (!! is short-hand).\n",
       "%%time:\n",
       "    Time execution of a Python statement or expression.\n",
       "%%timeit:\n",
       "    Time execution of a Python statement or expression\n",
       "%%writefile:\n",
       "    ::\n"
      ]
     },
     "execution_count": 6,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "total 330\n",
      "-rw-r--r-- 1 ljl 197121    103 Jul 20 11:58 1.txt\n",
      "-rw-r--r-- 1 ljl 197121 175383 Jul 20 11:32 1563593535473.jpg\n",
      "-rw-r--r-- 1 ljl 197121  77285 Jul 28 09:22 fast learn jupyter.ipynb\n",
      "-rw-r--r-- 1 ljl 197121  81043 Jun 15 06:41 mm_facetoface_collect_qrcode_1560552098216.png\n",
      "-rw-r--r-- 1 ljl 197121    593 Jul 20 08:22 涓�瀛﹀钩闈㈠嚑浣�.ipynb\n"
     ]
    }
   ],
   "source": [
    "!ls -l"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
   ],
   "source": [
    "files = !ls\n",
    "files.s\n",
    "files.n\n",
    "#files.l"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'1.txt\\n1563593535473.jpg\\nfast learn jupyter.ipynb\\nmm_facetoface_collect_qrcode_1560552098216.png\\n涓�瀛﹀钩闈㈠嚑浣�.ipynb'"
      ]
     },
     "execution_count": 13,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\alpha$\n"
      ],
      "text/plain": [
       "<IPython.core.display.Latex object>"
      ]
     },
     "execution_count": 15,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%latex\n",
    "$\\alpha$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "UsageError: %%svg is a cell magic, but the cell body is empty.\n"
     ]
    }
   ],
   "source": [
    "%%svg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1267650600228229401496703205376\n",
      "Wall time: 0 ns\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "x=2**100\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   1: *int*?\n",
      "   2: prime*?\n",
      "   3:\n",
      "import collections\n",
      "collections.\n",
      "   4:\n",
      "import collections\n",
      "collections.namedtuple?\n",
      "   5: collections.Counter??\n"
     ]
    }
   ],
   "source": [
    "%history -n 1-5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-28-222d6ece8c1e>, line 5)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-28-222d6ece8c1e>\"\u001b[1;36m, line \u001b[1;32m5\u001b[0m\n\u001b[1;33m    ```\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "from ipyleaflet import Map\n",
    "\n",
    "Map(center=[34.6252978589571, -77.34580993652344], zoom=10)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false
   },
   "source": [
    "```\n",
    "installation\n",
    "With conda:\n",
    "\n",
    "conda install -c conda-forge ipyleaflet\n",
    "\n",
    "With pip:\n",
    "\n",
    "pip install ipyleaflet\n",
    "jupyter nbextension enable --py --sys-prefix ipyleaflet\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<iframe src=\"https://player.vimeo.com/video/26763844?title=0&byline=0&portrait=0\" width=\"700\" height=\"394\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href=\"https://vimeo.com/26763844\">BAXTER DURY - CLAIRE (Dir Cut)</a> from <a href=\"https://vimeo.com/dannysangra\">Danny Sangra</a> on <a href=\"https://vimeo.com\">Vimeo</a>.</p>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 30,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from IPython.display import HTML\n",
    "\n",
    "# Youtube\n",
    "HTML('<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/S_f2qV2_U00?rel=0&amp;controls=0&amp;showinfo=0\" frameborder=\"0\" allowfullscreen></iframe>')\n",
    "\n",
    "# Vimeo\n",
    "HTML('<iframe src=\"https://player.vimeo.com/video/26763844?title=0&byline=0&portrait=0\" width=\"700\" height=\"394\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href=\"https://vimeo.com/26763844\">BAXTER DURY - CLAIRE (Dir Cut)</a> from <a href=\"https://vimeo.com/dannysangra\">Danny Sangra</a> on <a href=\"https://vimeo.com\">Vimeo</a>.</p>')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/S_f2qV2_U00?rel=0&amp;controls=0&amp;showinfo=0\" frameborder=\"0\" allowfullscreen></iframe>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 31,
     "metadata": {
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from IPython.display import HTML\n",
    "\n",
    "HTML('<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/S_f2qV2_U00?rel=0&amp;controls=0&amp;showinfo=0\" frameborder=\"0\" allowfullscreen></iframe>')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
   ],
   "source": [
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (system-wide)",
   "language": "python",
   "metadata": {
    "cocalc": {
     "description": "Python 3 programming language",
     "priority": 100,
     "url": "https://www.python.org/"
    }
   },
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}